package com.masterrabbit.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.masterrabbit.common.core.annotation.Excel;
import com.masterrabbit.common.core.web.domain.BaseEntity;

/**
 * 评价信息对象 reviews
 * 
 * @author laotu
 * @date 2025-03-19
 */
@Data
public class Reviews extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID（自增） */
    private Long reviewId;

    /** 订单编号（UUID） */
    @Excel(name = "订单编号", readConverterExp = "U=UID")
    private String orderNumber;

    /** 评分 */
    @Excel(name = "评分")
    private Long rating;

    /** 图片id（图片表外键） */
    @Excel(name = "图片id", readConverterExp = "图=片表外键")
    private Long imageId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 关联用户（外键） */
    @Excel(name = "关联用户", readConverterExp = "外=键")
    private Long userId;

    private SysUser sysUser;

    public void setReviewId(Long reviewId) 
    {
        this.reviewId = reviewId;
    }

    public Long getReviewId() 
    {
        return reviewId;
    }

    public void setOrderNumber(String orderNumber) 
    {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() 
    {
        return orderNumber;
    }

    public void setRating(Long rating) 
    {
        this.rating = rating;
    }

    public Long getRating() 
    {
        return rating;
    }

    public void setImageId(Long imageId) 
    {
        this.imageId = imageId;
    }

    public Long getImageId() 
    {
        return imageId;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("reviewId", getReviewId())
            .append("orderNumber", getOrderNumber())
            .append("rating", getRating())
            .append("imageId", getImageId())
            .append("createdAt", getCreatedAt())
            .append("content", getContent())
            .append("userId", getUserId())
            .toString();
    }
}
